<?php
abstract class Controller{
    protected $_controller ='';
    protected $_actie ='Index' ;
    protected $_model = NULL;
    protected $_view = NULL;
    protected $_pad = '';
    public function __construct($pad='',$actie='') {
        $this->_pad = explode('/', $pad);
        $this->_actie = $actie;
        $tmp = explode('\\',get_called_class());
        $this->_controller = end($tmp);
        $this->_view = new View();
    }
    protected function getModel(){
        $model = 'model\\'.$this->_controller.'_'.$this->_actie;
        //print "***".$model."***";
        if(__klasseBestaat($model)){
            $this->_model = new $model();
        }else{
            die('Geen model '.$model);
        }
    }
    abstract public function init(); 
}

